import json from "../../../../package.json"
console.log("json",json);
export const getMainJs = () => {
  return `
    import Vue from "vue";
    import App from "./App.vue";
    import wdc from "wdc-charts-vue/lib/index"
    Vue.use(wdc)
    
    Vue.config.productionTip = false;
    
    new Vue({
    render: h => h(App)
    }).$mount("#app");
    `;
};
export const getIndexHtml = () => {
  return `
    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="viewport" content="width=device-width,initial-scale=1.0" />
        <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
        <title>codesandbox</title>
      </head>
      <body>
        <noscript>
          <strong
            >We're sorry but codesandbox doesn't work properly without JavaScript
            enabled. Please enable it to continue.</strong
          >
        </noscript>
        <div id="app"></div>
        <!-- built files will be auto injected -->
      </body>
    </html>
    `;
};

export const getPackageJson = () => {
  return {
    content: {
      name: "vue",
      version: "0.1.0",
      private: true,
      scripts: {
        serve: "vue-cli-service serve",
        build: "vue-cli-service build",
        lint: "vue-cli-service lint",
      },
      dependencies: {
        "@vue/cli-plugin-babel": "4.1.1",
        vue: "^2.6.11",
        [json.name]:json.version
      },
      devDependencies: {
        "@vue/cli-plugin-eslint": "4.1.1",
        "@vue/cli-service": "4.1.1",
        "babel-eslint": "^10.0.3",
        eslint: "^6.7.2",
        "eslint-plugin-vue": "^6.0.1",
        "vue-template-compiler": "^2.6.11",
      },
      eslintConfig: {
        root: true,
        env: {
          node: true,
        },
        extends: ["plugin:vue/essential", "eslint:recommended"],
        rules: {},
        parserOptions: {
          parser: "babel-eslint",
        },
      },
      postcss: {
        plugins: {
          autoprefixer: {},
        },
      },
      browserslist: ["> 1%", "last 2 versions", "not ie <= 8"],
      keywords: ["vue", "vuejs", "starter"],
      description: "Vue.js example starter project",
    },
  };
};
